#!/bin/bash
set -e

if [[ $# != 1 ]]; 
then
    echo "Usage: release 1.0.0"
    exit -1
fi

if [ -e dist ]
then
    rm -rf dist
fi

if [ -e library ]
then
    rm -rf library
fi

export VENDOR="borqs"
export PRODUCT="lobby"
export VERSION=$1

python setup.py py2exe
cd nsis
makensis newlobby.nsi
cd ..
echo "build success!"
